package com.lgz.dbcourse.gui;

import javax.swing.*;

/**
 * @Author: LGZ
 * @Date: 2021/4/13 15:37
 * @Description:
 */
public class MyFrame extends JFrame {
    protected final static String STYLE = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
    protected final static String USER = "User";
    protected final static String STAFF = "Staff";

    public MyFrame() {
        this("");
    }

    public MyFrame(String title) {
        super(title);
        // 更换主题
        try {
            UIManager.setLookAndFeel(STYLE);
        } catch (Exception e) {
            e.printStackTrace();
        }
        // 尺寸不可拉伸
        this.setResizable(false);
        // 开启关闭
        this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

    }
}
